﻿@model SitePage
@{
    Layout = null;
}

@using Century.Model.CMS

@Html.ValidationSummary(true)
<div class="tbl-div left">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="login-tbl">
        <tr>
            <td colspan="2">
                <h2>
                    @ViewBag.FormHeaderText
                    @Html.HiddenFor(model => model.Id)
                    @Html.HiddenFor(model => model.SiteId)
                    @Html.HiddenFor(model => model.ParentId)
                </h2>
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Page Layout *</b>
            </td>
            <td>
                @Html.DropDownListFor(model => model.PageLayoutId, new SelectList((List<PageLayout>)ViewData["Layouts"], "Id", "Name"), new { @class = "big" })
                @Html.ValidationMessageFor(model => model.PageLayoutId)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>@Html.LabelFor(model => model.Name) *</b>
            </td>
            <td>
                @Html.TextBoxFor(model => model.Name, new { @class = "big" })
                @Html.ValidationMessageFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Local Name *</b>
            </td>
            <td>
                @Html.TextBoxFor(model => model.LocalName, new { @class = "big" })
                @Html.ValidationMessageFor(model => model.LocalName)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>@Html.LabelFor(model => model.Title) *</b>
            </td>
            <td align="left">
                @Html.TextBoxFor(model => model.Title, new { @class = "big" })
                @Html.ValidationMessageFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Url</b>
            </td>
            <td align="left">
                @Html.TextBoxFor(model => model.Url, new { @class = "big" })
                @Html.ValidationMessageFor(model => model.Url)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Menu Order</b>
            </td>
            <td>
                @(Html.Telerik().NumericTextBox()
                            .Name("NodeOrder")
                            .Spinners(true)
                            .MinValue(0)
                            .MaxValue(100)
                            .EmptyMessage("Enter an order")
                            .DecimalDigits(0)
                            .InputHtmlAttributes(new { @class = "small" })
                        )
                &nbsp;(min : 0 - max : 100)
                @Html.ValidationMessageFor(model => model.NodeOrder)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>MenuDescription</b>
            </td>
            <td align="left">
                @Html.TextAreaFor(model => model.MenuDescription, new { @class = "big high" })
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Banner Image Path</b>
            </td>
            <td align="left">
                @Html.TextBoxFor(model => model.ImagePath, new { @class = "big" })
                @Html.FileExplorerFor("~/Content/themes/default/img/banner/page_header", "ImagePath")
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Menu Image Path</b>
            </td>
            <td align="left">
                @Html.TextBoxFor(model => model.MenuImagePath, new { @class = "big" })
                @Html.FileExplorerFor("~/Content/themes/default/img/menu", "MenuImagePath")
            </td>
        </tr>
        <tr>
            <td class="lbl">
               <b>Keywords</b>
            </td>
            <td align="left">
                @Html.TextAreaFor(model => model.Keywords, new { @class = "big high" })
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Description</b>
            </td>
            <td align="left">
                @Html.TextAreaFor(model => model.Description, new { @class = "big high" })
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Is Home Page</b>
            </td>
            <td align="left">
                @*@if (Century.Web.Security.Authorizations.CenturyAuthorization.Authorize(HttpContext.Current.User.Identity.Name, new Century.Web.Security.ActionModule { Name = "Administration", DisplayName = "Administration" }))
                {*@
                    @Html.CheckBoxFor(model => model.IsHomePage)
               @* }
                else
                {                           
                    @Html.CheckBoxFor(model => model.IsHomePage, new { disabled = "true" }) <text>{ * only admin(s) can edit this value }</text>
                } *@
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Show In Menu</b>
            </td>
            <td align="left">
                @Html.CheckBoxFor(model => model.ShowInMenu)
            </td>
        </tr>
         <tr>
            <td class="lbl">
                <b>Show In Right Menu</b>
            </td>
            <td align="left">
                @Html.CheckBoxFor(model => model.ShowInRightMenu)
            </td>
        </tr>
        <tr>
            <td class="lbl">
                <b>Is Published</b>
            </td>
            <td align="left">
                @Html.CheckBoxFor(model => model.IsPublished)
            </td>
        </tr>
        <tr>
            <td class="lst" colspan="2">
                <input type="submit" class="btn_green btn" id="PostIT" value="Save" />
            </td>
        </tr>
        <tr>
            <td class="lst" colspan="2">
                <span id="processResult"></span>
            </td>
        </tr>
    </table>
</div>
